import copy
import random
from datetime import datetime, timedelta

events_list = []

# 复制现有数据
new_events_list = copy.deepcopy(events_list)

# 生成新的活动数据
for i in range(1, 23):  # 假设要扩充到 25 条数据
    new_event = {
        "id": str(i),
        "name": "新活动" + str(i),
        "address": random.choice(["广州市天河区", "深圳市福田区", "深圳市宝安区", "广州市番禺区"]),
        "contactPhone": "139" + ''.join(random.choice('0123456789') for _ in range(8)),
        "serviceType": random.choice(["社区服务", "教育支持", "老年关怀", "儿童关爱"]),
        "serviceStart": (datetime.now() + timedelta(days=random.randint(1, 1))).strftime("%Y-%m-%d %H:%M"),
        "serviceEnd": (datetime.now() + timedelta(days=random.randint(1, 1), hours=random.randint(1, 8))).strftime(
            "%Y-%m-%d %H:%M"),
        "money": str(random.randint(50, 200)),
        "introduce": random.choice(["18-24", "25-40", "30-40", "不限"]) + ",新活动介绍" + str(i),
        "gender": random.choice(["男", "女", "不限"]),
        # "age": random.choice(["18-24", "25-40", "40以上", "不限"]),
        "peopleNum": str(random.randint(5, 30)),
        "contactName": random.choice(["王小明", "李小红", "张小强", "赵小云"]),
    }
    new_events_list.append(new_event)

# 输出扩充后的数据
for event in new_events_list:
    print(event)

user_events = []
# 生成新用户的历史活动数据
for i in range(1, 10):  # 假设要扩充到 25 条数据
    new_event = {
        "id": str(i),
        "name": "新活动" + str(i),
        "address": random.choice(["广州市天河区", "深圳市福田区", "深圳市宝安区"]),
        "contactPhone": "139" + ''.join(random.choice('0123456789') for _ in range(8)),
        "serviceType": random.choice(["社区服务", "教育支持"]),
        "serviceStart": (datetime.now() + timedelta(days=random.randint(1, 1))).strftime("%Y-%m-%d %H:%M"),
        "serviceEnd": (datetime.now() + timedelta(days=random.randint(1, 1), hours=random.randint(4, 5))).strftime(
            "%Y-%m-%d %H:%M"),
        "money": str(random.randint(120, 160)),
        "introduce": random.choice(["18-24", "25-40", "30-40", "不限"]) + ",新活动介绍" + str(i),
        # "gender": random.choice(["男", "女", "不限"]),
        # "age": random.choice(["18-24", "25-40", "40以上", "不限"]),
        "peopleNum": str(random.randint(15, 20)),
        "contactName": random.choice(["王小明", "李小红", "张小强", "赵小云"]),
    }
    user_events.append(new_event)

# 输出扩充后的数据
for event in user_events:
    print(event)
